package com.project.controller;

import com.project.bean.CityBean;
import com.project.service.ICityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("city")
public class CityController {
    @Autowired
    private ICityService service;

    @RequestMapping("findByCountry")
    public List<CityBean> findByCountry(int countryId){
        return service.findById(countryId);
    }
}